package maze

import (
	mathrand"math/rand"
	"time"
)

var (
	ranSource = mathrand.NewSource(time.Now().UnixNano())
	ran = mathrand.New(ranSource)
)

// RandomNumber 生成指定区间随机数
func RandomNumber(min, max int) int {
	if min > max {
		min, max = max, min
	}
	return ran.Intn(max-min) + min
}
